package grammer.components;

/**
 * 
 * 
 * @author Minodor
 * 
 *         Enumeration for objects
 */
public enum ObjectEnum implements Component {
	AIR_CONDITIONING, BATHTUB, CLOTHES, COFFEE_FILTER, COMPUTER, DISH_WASHER, ELECTRIC_PLATE, GAS_COOKER, GENERIC_OBJECT, HAIR_DRYER, HEATING, HERSELF, HIMSELF, LIGHT, RADIATOR, REFRIGERATOR, SHOWER, SINK, STOVE, TELEVISION, TOASTER, TOILET,

	VACUUM_CLEANER, WASHING_MACHINE;

	@Override
	public Component match(String toMatch) {
		for (ObjectEnum object : ObjectEnum.values()) {
			if (object.toString().equalsIgnoreCase(toMatch))
				return object;
		}
		return null;
	}

	@Override
	public String toString() {
		switch (this) {
		case DISH_WASHER:
			return "dish_washer";
		case HIMSELF:
			return "himself";
		case HERSELF:
			return "herself";
		case SINK:
			return "sink";
		case HAIR_DRYER:
			return "hair_dyer";
		case HEATING:
			return "heating";
		case VACUUM_CLEANER:
			return "vacuum_cleaner";
		case GAS_COOKER:
			return "gas_cooker";
		case ELECTRIC_PLATE:
			return "electric_plate";
		case REFRIGERATOR:
			return "refrigerator";
		case COMPUTER:
			return "computer";
		case TELEVISION:
			return "television";
		case LIGHT:
			return "light";
		case WASHING_MACHINE:
			return "washing_machine";
		case AIR_CONDITIONING:
			return "air_conditioning";
		case BATHTUB:
			return "bathtub";
		case STOVE:
			return "stove";
		case COFFEE_FILTER:
			return "coffee_filter";
		case CLOTHES:
			return "clothes";
		case RADIATOR:
			return "radiator";
		case TOASTER:
			return "toaster";
		case TOILET:
			return "toilet";
		case SHOWER:
			return "shower";
		default:
			return "Object";
		}
	}
}
